#ifndef TYPEDEFS_H
#define TYPEDEFS_H

#include <list>

//Objects and structs

class Monster;
class Item;
class Armor;
class Weapon;
class Tile;
class MapObject;
class Consumable;

typedef struct
{
	Monster * monster;
	int force;
	int direction;
} flyEvent;

struct map
{
	int mapIndex;
	Tile * mapTiles[ 80 ][ 20 ];
	std::list< MapObject * > mapObjects;
	std::list< Monster * > mapMonsters;
	std::list< Item * > mapItems;
};

class Manager;
extern Manager manager;

/*enum item_type
{
	type_none,
	type_item,
	type_tile,
	type_monster,
	type_armor,
	type_weapon
};*/

struct objType
{
	unsigned int mapObject : 1;
	unsigned int monster : 1;
	unsigned int tile : 1;
	unsigned int item : 1;
	unsigned int armor : 1;
	unsigned int weapon : 1;
	unsigned int consumable : 1;
};

struct stats_t
{
	int strength;
	int agility;
	int inelligence;
	int endurance;
};

extern const stats_t
	stats_standard, stats_fighter, stats_mage;

struct skills_t
{
	int weapon;
	int brawl;
	int defense;
};

extern const skills_t
	skills_standard, skills_fighter;

struct monster_t
{
	char * name;
	char symbol;
	unsigned int color;
	stats_t attributes;
	skills_t skills;
};

extern const monster_t
	kobold, goblin;

struct armor_t
{
	const char * name;
	char symbol; // not sure if should be here
	unsigned int color;
	int protection;
};

extern const armor_t
	chain_mail;

struct weapon_t
{
	const char * name;
	char symbol;
	unsigned int color;
	int damage;
	bool firearm;
	int shotDamage;
};

extern const weapon_t
	zweihander, berdanka;

struct consumable_t
{
	const char * name;
	char symbol;
	unsigned int color;
	int ( *effect )( Monster *, int );
	int strength;
};

extern const consumable_t
	potionOfHealing;

#endif TYPEDEFS_H